bitkeeper revision 1.1389.5.19 (427a4637g44Zsgumd50KMgMbI7bt2g)
authorcl349@firebug.cl.cam.ac.uk[cl349] <cl349@firebug.cl.cam.ac.uk[cl349]>
Thu, 5 May 2005 16:13:43 +0000 (16:13 +0000)
committercl349@firebug.cl.cam.ac.uk[cl349] <cl349@firebug.cl.cam.ac.uk[cl349]>
Thu, 5 May 2005 16:13:43 +0000 (16:13 +0000)
Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
fixmap.h, pgtable.c:
  Remove __set_fixmap_ma and handle difference in installing machine-address
  and pseudo-physical-address fixmap entries inside __set_fixmap.
reboot.c, gnttab.c, ioremap.c:
  Change set_fixmap_ma call to set_fixmap call.
init.c:
  Change set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call to
  __set_fixmap(,, PAGE_KERNEL_RO) call.
boot.c:
  Change __set_fixmap_ma calls to set_fixmap calls.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c
linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c
linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c
linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c
linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h

index bf4e0a49867b2189c54f8e91997a3910a5b05932..d169b3c6848e81b6fd502f0081d41979e9a94b19 100644 (file)
@@ -113,9 +113,8 @@ char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
 
        j = PAGE_ALIGN(size) >> PAGE_SHIFT;
        for (i = 0; (i < FIX_ACPI_PAGES) && j ; i++, j--) {
-               __set_fixmap_ma(FIX_ACPI_END - i,
-                               (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT),
-                               PAGE_KERNEL);
+               set_fixmap(FIX_ACPI_END - i,
+                          (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT));
        }
 
        return (char *) __fix_to_virt(FIX_ACPI_END) + (phys_addr & ~PAGE_MASK);
@@ -658,7 +657,7 @@ acpi_find_rsdp (void)
        if (!rsdp_phys)
                rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
 
-       __set_fixmap_ma(FIX_ACPI_RSDP_PAGE, rsdp_phys, PAGE_KERNEL);
+       set_fixmap(FIX_ACPI_RSDP_PAGE, rsdp_phys);
 
        return rsdp_phys;
 }
index 860c2060be0a09b0eae17393fc959097dd21c491..e3a588e0292796a983cd2124e197546a522d51be 100644 (file)
@@ -562,7 +562,7 @@ void __init paging_init(void)
        zone_sizes_init();
 
        /* Switch to the real shared_info page, and clear the dummy page. */
-       set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
+       set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
        HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
        memset(empty_zero_page, 0, sizeof(empty_zero_page));
 
@@ -570,10 +570,11 @@ void __init paging_init(void)
        /* Setup mapping of lower 1st MB */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
                if (xen_start_info.flags & SIF_PRIVILEGED)
-                       set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
+                       set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                else
-                       set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
-                                        virt_to_machine(empty_zero_page));
+                       __set_fixmap(FIX_ISAMAP_BEGIN - i,
+                                    virt_to_machine(empty_zero_page),
+                                    PAGE_KERNEL_RO);
 #endif
 }
 
index 7e58a230fc730013dbdb4d8a49c8b5181fe99ef9..86a3672e3366aa2416a9b0c272a4d3fd051e1475 100644 (file)
@@ -256,7 +256,7 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
         */
        idx = FIX_BTMAP_BEGIN;
        while (nrpages > 0) {
-               set_fixmap_ma(idx, phys_addr);
+               set_fixmap(idx, phys_addr);
                phys_addr += PAGE_SIZE;
                --idx;
                --nrpages;
index 7a586cab7e988f4ecb9961e95631c63cbafaa2f8..59399cceff084668b688f09db9e81df7795a1b2d 100644 (file)
@@ -176,18 +176,18 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
                BUG();
                return;
        }
-       set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
-}
-
-void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
-{
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               BUG();
-               return;
+       switch (idx) {
+       case FIX_WP_TEST:
+       case FIX_VSYSCALL:
+#ifdef CONFIG_X86_F00F_BUG
+       case FIX_F00F_IDT:
+#endif
+               set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
+               break;
+       default:
+               set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
+               break;
        }
-       set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
 }
 
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
index 0ae2ac6548dee2b7cbab2062c3c8e340dadf27ba..69293cdb73ff416c85eeca61b642a4efde4a0c65 100644 (file)
 #include <asm-xen/linux-public/privcmd.h>
 #include <asm-xen/gnttab.h>
 
-#ifndef set_fixmap_ma
-#define set_fixmap_ma set_fixmap
-#endif
-
 #if 1
 #define ASSERT(_p) \
     if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
@@ -339,7 +335,7 @@ int gnttab_resume(void)
     BUG_ON(setup.status != 0);
 
     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
-        set_fixmap_ma(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
+        set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
 
     return 0;
 }
index 64616102010e4e37650a11c3ed959a1137c529c1..bca2a7de53c7aba01ffb72e97860c44570482af4 100644 (file)
@@ -129,11 +129,7 @@ static void __do_suspend(void)
     memcpy(&xen_start_info, &suspend_record->resume_info,
            sizeof(xen_start_info));
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-    set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
-#else
     set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
-#endif
 
     HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
 
index c79f8a94a0340531ac4aff7bf23aa7939ab9f89d..2bd859ff5f307e3fb63f7b7ed549e6c265bdcaab 100644 (file)
@@ -104,20 +104,14 @@ enum fixed_addresses {
 
 extern void __set_fixmap (enum fixed_addresses idx,
                                        unsigned long phys, pgprot_t flags);
-extern void __set_fixmap_ma (enum fixed_addresses idx,
-                                       unsigned long mach, pgprot_t flags);
 
 #define set_fixmap(idx, phys) \
                __set_fixmap(idx, phys, PAGE_KERNEL)
-#define set_fixmap_ma(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL)
-#define set_fixmap_ma_ro(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_RO)
 /*
  * Some hardware wants to get fixmapped without caching.
  */
 #define set_fixmap_nocache(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE)
+               __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
 
 #define clear_fixmap(idx) \
                __set_fixmap(idx, 0, __pgprot(0))